{template 'phpcms','header'}
<!--begin main-->
<div id="main">
  <div id="main_l" class="bdr_1">
    <!--位置导航-->
    <div id="position"><a href="">首页</a>{catpos($r['catid'])}</div>
    <div id="content">
      <div id="content_head">
        <!--文章标题-->
        <h1>{if $titleintact}{$titleintact}{else}{$title}{/if}</h1>
        <!--基本属性-->
        <h2><span>{$updatetime}</span> 作者：{if $author}{$author}{else}{$userid}{/if} 来源：{$copyfrom} {if $PHPCMS[show_hits]}浏览次数：<span id="hits">0</span>{/if} 
		{if isset($MODULE[comment])}{php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);}
		<a href="{$MODULE[comment][url]}?keyid={$keyid}&verify={$verify}" style="color:red;">网友评论 <span id="comments_top">0</span> 条</a>
		{/if}</h2>
      </div>
      <!--简单描述-->
      {if $description}
      <div id="digest">{$description}</div>
      {/if}
      <!--正文-->
      <div id="endtext">
		{if $allow_priv}<!--判断阅读权限-->
			{if $allow_readpoint}<!--判断是否已经扣点-->
				{$content}
			{else}
				<span style='background:#E4F5FA'><a href='readpoint.php?contentid={$contentid}'>阅读本文需要消耗<font color='red'>{$readpoint}</font>点，您确认查看吗？</a></span>
			{/if}
		{else}
			<font color="#FF0000">您没有权限阅读</font>
		{/if}
	  </div>
      {if $keywords}
      <div id="keyword"><strong>关键词：</strong>{$keywords}</div>
      {/if}
      {if $titles}
      <div id="titles">
        <h3>本文导航</h3>
        {$titles} </div>
      {/if}
      <!--分页-->
      <div id="pages">{$pages}</div>
      <!--心情指数模块-->
      {if isset($MODULE[mood])}
      <div id="moodrank_div"></div>
      <script  type="text/javascript">var contentid = {$contentid};</script>
      <script type="text/javascript" id="callback_js"></script>
      <script type="text/javascript" src="data/moodrank/1.js"></script>
      {/if}
      {if isset($MODULE[digg])}
	  <div id="digg_div"></div>
	  <script  type="text/javascript">var contentid = {$contentid}; var catid = {$r['catid']}</script>
	  <script type="text/javascript" id="calldigg_js"></script>
      <script type="text/javascript" src="{$MODULE[digg][url]}digg.php?contentid={$contentid}&catid={$r[catid]}"></script>
      {/if}
	<div class="clear"></div>
    <div class="box" style="margin-top:1%;">
      <h3>相关文章</h3>
      <ul class="text_list">
        {tag_内容页相关信息} 
      </ul>
    </div>
      <div class="clear"></div>
      {if isset($MODULE[mail])}
      <form action="{$MODULE[mail][url]}sendmail.php" name="sendmail" id="sendmail">
        <input type="hidden" name="title" value="推荐：{$title}" />
        <input type="hidden" name="content" value=" <a href='{SITE_URL}{$url}' target='_blank'>{$title}</a><br/>" />
      </form>
      {/if}
       {if isset($MODULE[error_report])}
      <form action="{$MODULE[error_report][url]}error_report.php" name="errors" id="errors">
        <input type="hidden" name="title" value="{$title}" />
		<input type="hidden" name="contentid" value="{$contentid}" />
      </form>
      {/if}
      <p id="text_1" style="margin-top:1%;">
        {if isset($MODULE[error_report])}<a href="javascript:$('#errors').submit();">[错误报告]</a>{/if} 
        {if isset($MODULE[mail])}<a href="javascript:$('#sendmail').submit();">[推荐]</a>{/if} 
        <a href="member/collect.php?contentid={$contentid}&action=add">[收藏]</a>
        <a href="javascript:window.print();">[打印]</a> <a href="javascript:window.close();">[关闭]</a> 
        <a href="{SITE_URL}{$url}#top">[返回顶部]</a> </p>

      <!--评论-->
      {if isset($MODULE[comment])}
      {php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);}
      <div id="commnent_tag">
        <a href="{$MODULE[comment][url]}?keyid={$keyid}&verify={$verify}"><img src="images/comment.gif" />
        已有<strong class="c_red"><span id="comments">0</span></strong>位网友发表了看法</a>
      </div>
      <div class="commenttext" style="text-align:center;margin-top:2%">
        <form action="{$MODULE[comment][url]}?action=addpost" method="post" onSubmit="return checkForm();">
			<input type="hidden" name="keyid" value="{$keyid}"/>
			<input type="hidden" name="verify" value="{$verify}"/>
		<ul>
          <li>
            <textarea cols="100" rows="8" name="comment" id="comment" onfocus="reply_clearfield()" onblur="reply_restoration()"></textarea>
          </li>
          <li style="text-align:left;margin-left:1%;margin-top:1%;">
            <span id="checker"><div style="float:left">验证码：</div><input type="text" style="ime-mode: disabled;" size="6" id="checkcode" name="checkcode" /><img src="" id="code_img" style="display:none" onclick="this.src='checkcode.php?'+Math.random()" alt="点击换一张"></span>
            <input id="dosubmit" name="dosubmit" type="submit" value="发表评论" />
          </li>
        </ul>
        </form>
      </div>
      <script type="text/javascript" src="data/js/comment_setting.js"></script>
      <script type="text/javascript">
      <!--
        $().ready(function() {        
            if(setting.ischecklogin == 0 && getcookie('auth') === null)
            {
                $('#comment').val("请您登陆后发表评论！");
                $('#comment').attr("disabled","disabled");
                $('#dosubmit').attr("disabled","disabled");
            }
            else 
            {
                $('#comment').val("我也来说两句！");
            }
        });
        function reply_restoration()
        {
            if($('#comment').val() == '')
            {
                $('#comment').val("我也来说两句！");
            }
        }
        function reply_clearfield()
        {
            if ($('#comment').val() == "我也来说两句！") 
            {
                $('#comment').val("");   
            }
			document.getElementById('code_img').style.display = 'block';document.getElementById('code_img').src='checkcode.php';
        }
        function checkForm()
        {
            if($('#comment').val() == '' || $('#comment').val() == "我也来说两句！")
            {
                alert("内容不能为空");
                $('#comment').focus();
                return false;
            }
            if($('#checkcode').val() == '' )
            {
                alert("验证码不能为空");
                $('#checkcode').focus();
                return false;
            }
            if ($('#comment').val().length > 1000) 
            {
                alert("内容太长，最多 1000 个文字");
                return false;
            }
        }
      //-->
      </script>
    {/if} 
    </div>
    
  </div>
  <div id="main_r">
    <!--广告位-->
    <div class="ad_side">
      <script language="javascript" src="data/js.php?id=5"></script>
    </div>
    <h4>最新图片文章</h4>
    <div>
      <ul class="pic_list">
        {tag_内容页图片最新标签}
      </ul>
    </div>
    <h4>最新文章</h4>
    <div>
      <ul class="text_list">
        {tag_内容页列表最新标签}
      </ul>
    </div>
	<!--{block("list_article", 1)}-->
  </div>
</div>
<!--end main-->
<script language="JavaScript" src="count.php?contentid={$contentid}"></script>
{template 'phpcms','footer'}